package com.dmooo.yxmmerchant.view.model;

import android.content.Context;

import com.common.net.entity.SubjectPost;
import com.common.net.listener.HttpOnNextListener;
import com.common.net.subscribers.ProgressSubscriber;
import com.dmooo.yxmmerchant.http.HttpManager;
import com.dmooo.yxmmerchant.view.contract.ServiceContract;

import java.util.HashMap;
import java.util.Map;

public class ServiceModel implements ServiceContract.ServiceMdl {
    private Context context;
    public ServiceModel(Context context) {
        this.context=context;
    }

    @Override
    public void getServiceList(String cat_id, int page, HttpOnNextListener listener) {
    }

    @Override
    public void getServiceDetail(String service_id, HttpOnNextListener listener) {
        Map<String,Object> map=new HashMap<>();
        map.put("service_id",service_id);
        SubjectPost post=new SubjectPost(new ProgressSubscriber(listener,context,true,true,""),map);
        HttpManager.getInstance().getServiceDetail(post);
    }
}
